#ifndef	__BFX_XMLLINKEDNODE_H__
#define	__BFX_XMLLINKEDNODE_H__

namespace BFX
{

#ifdef	BFX_DLL_BUILD
template class BFX_API REF<REFXMLLinkedNode>;
#endif

//////////////////////////////////////////////////////////////////////////////

// Gets the node immediately preceding or following this node.
class BFX_API REFXMLLinkedNode : public REFXMLNode
{
	friend class REFXMLNode;
	friend class REFXMLElement;
	friend class REFXMLDocument;

protected:
	REFXMLLinkedNode();
	REFXMLLinkedNode(REFXMLDocument* pDoc);

public:
	virtual ~REFXMLLinkedNode();

	// Gets the node immediately preceding this node.
	virtual REFXMLNode* GetPreviousSibling() const;
	// Gets the node immediately following this node.
	virtual REFXMLNode* GetNextSibling() const;

protected:
	REFXMLLinkedNode*		m_pPrev;
	REF<REFXMLLinkedNode>	m_pNext;
};

}	//	namespace BFX

#endif	//	__BFX_XMLLINKEDNODE_H__
